from django.db import models

from cars.models import Cars
from users.models import *
# Create your models here.

class Reservation(models.Model):
    model = models.CharField(max_length=20,verbose_name='品牌')
    cname = models.CharField(max_length=20,verbose_name='车名')
    img = models.ImageField(upload_to='static/models/',verbose_name='实物图')
    type  = models.CharField(max_length=20,verbose_name='车型')
    price = models.IntegerField(verbose_name='首付价')
    oprice = models.CharField(max_length=30,verbose_name='报价')
    firm = models.CharField(max_length=20,verbose_name='厂商')
    rank = models.CharField(max_length=20,verbose_name='级别')
    endurance = models.CharField(max_length=20,verbose_name='续航')
    charge = models.CharField(max_length=20,verbose_name='快充')
    user = models.ForeignKey(User, on_delete=models.CASCADE)
    cars = models.ForeignKey(Cars, on_delete=models.CASCADE)

